package com.somnus.androidkotlindemo.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.somnus.androidkotlindemo.R
import com.somnus.androidkotlindemo.bean.StaffBean
import kotlinx.android.synthetic.main.item_top_recycler.view.*

/**
 * Created by Somnus on 2017/6/29.
 * @Description:
 *
 *
 * 使用BaseRecyclerAdpater item 设置match 可以全屏 ， 原生的不会 .是自适应
 */
class BaseRecyclerTopAdapter : BaseQuickAdapter<StaffBean, BaseViewHolder>(R.layout.item_top_recycler) {

    override fun convert(helper: BaseViewHolder?, item: StaffBean?) {
        with(helper?.itemView!!) {
            textView3.text = "姓名：" + item?.staffName
        }
        helper.addOnClickListener(R.id.content_view).addOnClickListener(R.id.btn_delete)


    }


}